60e60c84c53aa2b364442a7ecda63c51349ffc83,src/edu/stanford/nlp/ie/crf/TestSequenceModel.java,TestSequenceModel,TestSequenceModel,#CRFCliqueTree#LabelDictionary#List#,31

Before Change


      for (int i = 0; i < allowedTagsAtPosition.length; ++i) {
        CoreMap token  = document.get(i);
        String observation = token.get(CoreAnnotations.TextAnnotation.class);
        if (labelDictionary.isConstrained(observation)) {
          Set<Integer> allowedLabels = labelDictionary.getConstrainedSet(observation);
          allowedTagsAtPosition[i] = new int[allowedLabels.size()];
          int j = 0;
          for (int labelIdx : allowedLabels) {
            allowedTagsAtPosition[i][j++] = labelIdx;
          }
        } else {

After Change


      for (int i = 0; i < allowedTagsAtPosition.length; ++i) {
        CoreMap token  = document.get(i);
        String observation = token.get(CoreAnnotations.TextAnnotation.class);
        allowedTagsAtPosition[i] = labelDictionary.isConstrained(observation) ?
            labelDictionary.getConstrainedSet(observation) : allTags;
      }
    }
  }